package com.guigusuqi.user.service;



import com.baomidou.mybatisplus.extension.service.IService;
import com.guigusuqi.commonutils.vo.Result;
import com.guigusuqi.user.dto.UserLoginDTO;
import com.guigusuqi.user.entity.LoginUser;
import com.guigusuqi.user.entity.SysUser;

import java.util.HashMap;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author suqi
 * @since 2023-02-23
 */
public interface SysUserService extends IService<SysUser>
{
    /**
     * 登录
     * @param userLoginDTO
     * @return
     */
    Result login(UserLoginDTO userLoginDTO);

    /**
     * 解析token
     * @param token
     * @return
     */
    LoginUser checkAndParseToken(String token);

    /**
     * 获取用户对应角色名
     * @param userId
     * @return
     */
    String getRoleByUserId(String userId);

    Result logout();

    SysUser findOneUserByName(String username);

    /**
     * 为各个流程节点设置审批人
     * @param
     * @return
     */
    HashMap<String, Object> setVariables(String userId);
}
